package tester;

/**
 * Created by IntelliJ IDEA.
 * User: aleck
 * Date: 2007-10-23
 * Time: 9:38:34
 * To change this template use File | Settings | File Templates.
 */
public class PersonsTesterThread extends BaseTesterThread {
  private final PersonManager persons;
  private final int[] rows;
  private final ProblemManager problems;

  public PersonsTesterThread(PersonManager persons, int[] rows, ProblemManager problems) {
    this.persons = persons;
    this.rows = rows;
    this.problems = problems;
  }

  public void run() {
    for (int i : rows) {
      Person person = persons.personList.get(i);
      for (Problem problem : problems.problemList) {
        PersonProblemTester spt =
            new PersonProblemTester(person, problem, Config.getWorkDir());
        spt.runTest();
      }
    }
    MessageOutput.println(finishedMessage);
  }
}
